package com.csun.cmny.provider.pojo;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

@Data
@Table(name = "cn_omc_bed")
public class Bed implements Serializable {
    private Integer bedId;

    private Integer roomId;

    private Integer bedNo;

    //护理等级id
    @Column(name = "level_care_id")
    private Long levelCareId;

    private Integer bedDirection;

    private Integer oldmanId;

    private Integer mattressId;

    private Integer alarmButtonId;

    private Integer status;

    private String bedAlias;

    private Integer valid;

    private Date createTime;

    private Date modifyTime;

    private Long modifier;

    private Integer reservationStatus;

    @Transient
    private String oldName;

    @Transient
    private Integer sex;

    private static final long serialVersionUID = 1L;

    public Integer getBedId() {
        return bedId;
    }

    public void setBedId(Integer bedId) {
        this.bedId = bedId;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    public Integer getBedNo() {
        return bedNo;
    }

    public void setBedNo(Integer bedNo) {
        this.bedNo = bedNo;
    }

    public Integer getBedDirection() {
        return bedDirection;
    }

    public void setBedDirection(Integer bedDirection) {
        this.bedDirection = bedDirection;
    }

    public Integer getOldmanId() {
        return oldmanId;
    }

    public void setOldmanId(Integer oldmanId) {
        this.oldmanId = oldmanId;
    }

    public Integer getMattressId() {
        return mattressId;
    }

    public void setMattressId(Integer mattressId) {
        this.mattressId = mattressId;
    }

    public Integer getAlarmButtonId() {
        return alarmButtonId;
    }

    public void setAlarmButtonId(Integer alarmButtonId) {
        this.alarmButtonId = alarmButtonId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getBedAlias() {
        return bedAlias;
    }

    public void setBedAlias(String bedAlias) {
        this.bedAlias = bedAlias;
    }

    public Integer getValid() {
        return valid;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Long getModifier() {
        return modifier;
    }

    public void setModifier(Long modifier) {
        this.modifier = modifier;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Bed other = (Bed) that;
        return (this.getBedId() == null ? other.getBedId() == null : this.getBedId().equals(other.getBedId()))
            && (this.getRoomId() == null ? other.getRoomId() == null : this.getRoomId().equals(other.getRoomId()))
            && (this.getBedNo() == null ? other.getBedNo() == null : this.getBedNo().equals(other.getBedNo()))
            && (this.getBedDirection() == null ? other.getBedDirection() == null : this.getBedDirection().equals(other.getBedDirection()))
            && (this.getOldmanId() == null ? other.getOldmanId() == null : this.getOldmanId().equals(other.getOldmanId()))
            && (this.getMattressId() == null ? other.getMattressId() == null : this.getMattressId().equals(other.getMattressId()))
            && (this.getAlarmButtonId() == null ? other.getAlarmButtonId() == null : this.getAlarmButtonId().equals(other.getAlarmButtonId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getBedAlias() == null ? other.getBedAlias() == null : this.getBedAlias().equals(other.getBedAlias()))
            && (this.getValid() == null ? other.getValid() == null : this.getValid().equals(other.getValid()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getModifyTime() == null ? other.getModifyTime() == null : this.getModifyTime().equals(other.getModifyTime()))
            && (this.getModifier() == null ? other.getModifier() == null : this.getModifier().equals(other.getModifier()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBedId() == null) ? 0 : getBedId().hashCode());
        result = prime * result + ((getRoomId() == null) ? 0 : getRoomId().hashCode());
        result = prime * result + ((getBedNo() == null) ? 0 : getBedNo().hashCode());
        result = prime * result + ((getBedDirection() == null) ? 0 : getBedDirection().hashCode());
        result = prime * result + ((getOldmanId() == null) ? 0 : getOldmanId().hashCode());
        result = prime * result + ((getMattressId() == null) ? 0 : getMattressId().hashCode());
        result = prime * result + ((getAlarmButtonId() == null) ? 0 : getAlarmButtonId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getBedAlias() == null) ? 0 : getBedAlias().hashCode());
        result = prime * result + ((getValid() == null) ? 0 : getValid().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getModifyTime() == null) ? 0 : getModifyTime().hashCode());
        result = prime * result + ((getModifier() == null) ? 0 : getModifier().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", bedId=").append(bedId);
        sb.append(", roomId=").append(roomId);
        sb.append(", bedNo=").append(bedNo);
        sb.append(", bedDirection=").append(bedDirection);
        sb.append(", oldmanId=").append(oldmanId);
        sb.append(", mattressId=").append(mattressId);
        sb.append(", alarmButtonId=").append(alarmButtonId);
        sb.append(", status=").append(status);
        sb.append(", bedAlias=").append(bedAlias);
        sb.append(", valid=").append(valid);
        sb.append(", createTime=").append(createTime);
        sb.append(", modifyTime=").append(modifyTime);
        sb.append(", modifier=").append(modifier);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}